package com.sunshine.ssm.aop;

import org.springframework.context.ApplicationContext;
import org.springframework.context.support.ClassPathXmlApplicationContext;

/**
 * @Author: WeiHong
 * @Date: 2017/5/16 11:17
 */
public class TestApp {
    public static void main(String[] args) {
        ApplicationContext ctx = new ClassPathXmlApplicationContext("spring/spring-aop.xml");
        HelloWorld hello1 = (HelloWorld) ctx.getBean("helloWorldImpl1");
        HelloWorld hello2 = (HelloWorld) ctx.getBean("helloWorldImpl2");
        hello1.printHelloWorld();
        hello1.doPrint();
        hello2.printHelloWorld();
        hello2.doPrint();

    }
}
